package day01;

public class shortleixing {
     public static void main(String[] args) {
		short a=(short) (Math.pow(2, 15)-1);
		System.out.println(a);
		int[] r=new int[100];
		int m=0;
		while(a>=2)
		{
			r[m]=a%2;

			a=(short) ((a-r[m])/2);
			m++;
		}
		r[m]=a;
		for(int j=m;j>=0;j--) {
			System.out.print(r[j]);
		}
		
		System.out.println("");
		 m=0;
		 a=(short) (Math.pow(2, 15)-1);
		while(a>=16)
		{
			r[m]=a%16;

			a=(short) ((a-r[m])/16);
			m++;
		}
		r[m]=a;
		for(int j=m;j>=0;j--) {
			System.out.print(r[j]);
		}
	}
}
